home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-069 qemm 603 / 1.ima / DVMAN / CH5.DEV < prev    next >
Encoding:
Text File  |  1991-10-08  |  29.3 KB  |  775 lines

  1. Chapter 5 
  2.  
  3. Learn: DESQView's Keystroke Macro Feature
  4.  
  5.  One of DESQview's most powerful features is Learn. You use Learn
  6. to tell DESQview to remember a sequence of your keystrokes and to
  7. assign these keystrokes to a particular key on your keyboard.
  8. Then, whenever you want, you can play back these keystrokes by
  9. pressing the assigned key.
  10.  
  11. A sequence of remembered keystrokes is called a script or a
  12. keystroke macro. The key to which you've assigned a script is
  13. called the mapped key.  It's mapped because, when you press it,
  14. DESQview maps ~dash~ translates ~dash~ the key into the script.
  15.  
  16. Once you've assigned a script to a key, the key's previous use
  17. (if any) is replaced by the script, as long as you're in the same
  18. context as you were when the script was created. By "in the same
  19. context" we mean:
  20.  
  21. ~Item~ If you created the script while running a program, the
  22. script will be associated with that program.  For example, if you
  23. created a script while in Lotus 1-2-3 ~dash~ and assigned it to
  24. the Ctrl-X key, then whenever, you're running 1-2-3 in DESQview,
  25. pressing Ctrl-X will play back the script.
  26.  
  27. ~Item~ If you created the script while a DESQview menu was
  28. displayed and assigned it, for example, to the F1 key, then
  29. whenever a DESQview menu is displayed and you press the F1 key,
  30. the script is played back.
  31.  
  32. In order to start and finish scripts, DESQview requires a special
  33. key, which we call the Learn key. By default, this is the Shift-
  34. DESQ ~dash~ that is, the keystroke formed by holding down the
  35. Shift key and tapping the DESQ key ~dash~ as the Learn key. This
  36. displays the Learn menu, from which you select the Learn action
  37. you want. You may redefine this key using DESQview Setup, if you
  38. wish.
  39.  
  40.  Scripts are loaded automatically by DESQview. When you start up
  41. DESQview, the scripts you created on DESQview menus are loaded.
  42. When you start up a program, scripts you created for the program
  43. are loaded.
  44.  
  45. ~Heading~ Learning a Script
  46.  
  47.  The basic steps to learn a script are:
  48.  
  49. ~Item~ Get your program to the point where you're ready to type
  50. the first keystroke of the script. Or, if you want to create a
  51. script that works  when a DESQview menu is displayed, display the
  52. DESQview menu you want.
  53.  
  54. ~Item~ Display the Learn menu and select Start Script. Then tell
  55. DESQview which key you want to use. Also, if you like, you can
  56. give the script a descriptive name, like "Load Report." This name
  57. will appear on the menu of scripts displayed when Display Scripts
  58. is selected from the Learn menu.
  59.  
  60. ~Item~ Enter all the keystrokes for the script. DESQview will
  61. remember these keystrokes as you enter them.
  62.  
  63. ~Item~ Display the Learn menu again and select Finish Script.
  64.  
  65. The script is now operational. To play it back,  just press the
  66. key(s) to which it is mapped or you may select  it from the
  67. Display Scripts menu.
  68.  
  69. ~Subhead~ Starting a Learn
  70.  
  71.  The first step in creating a script is to tell DESQview you want
  72. to start a Learn operation. After you've reached the point where
  73. you're ready to enter the first keystroke of the script:
  74.  
  75. ~Step~ Hold down the Shift key and tap the DESQ key to display
  76. the Learn menu.
  77.  
  78. We call Shift-DESQ the Learn key. There is no mouse equivalent.
  79. You must start a Learn from the keyboard.
  80.  
  81. ~Step~ Select Start Script. You can do this using either the
  82. keyboard or the mouse.
  83.  
  84. The following message appears:
  85.  
  86.     Press the Key You
  87.     Want to Redefine
  88.  
  89. ~Step~ Press the key you want to use ~dash~ for example, the F1
  90. key.
  91.  
  92. The Start a Script menu appears.
  93.  
  94.  DESQview recognizes two types of keys. Typewriter keys
  95. correspond to the text that appears on the screen when you type-
  96. ~dash~ namely, the letters, numbers, and common symbols. Special
  97. keys correspond to actions ~dash~ such as <Enter>, Backspace, F1,
  98. Alt-M, Ctrl- X, and so forth. They don't have a standard text (or
  99. screen) representation.
  100.  
  101.  In the actual script file, DESQview represents special keys as
  102. the key name in curly brackets ~dash~ for example, {Enter},
  103. {BackSpace}, {F1}, {Alt-M}, {Ctrl- X}, and so forth. See Appendix
  104. I for a list of the keys DESQview uses and for information on
  105. which keys can and cannot be redefined.
  106.  
  107. You may optionally give the script a name. We recommend you do so
  108. to help remind you what the script does. You can display a menu
  109. of the scripts you've create by selecting the Display Scripts
  110. command from the Learn menu  ( see page 92). If you have
  111. previously defined a script for that key, its name will appear in
  112. the name field.
  113.  
  114. ~Step~ If you want your script to have a name, type that name.
  115.  
  116.  If the name you enter starts with an exclamation point (!), the
  117. script becomes a startup script. See page 92.
  118.  
  119. ~Step~ Select LEARN Script.
  120.  
  121. The Start a Script menu disappears. Everything you type, until
  122. you press the Learn key again, is recorded as part of the script.
  123.  
  124.  To cancel the Learn: Instead of selecting LEARN Script, press
  125. Tab and then type C.
  126.  
  127. ~Subhead~ Entering the Script
  128.  
  129. ~Step~ Perform whatever action you want to be recorded as the
  130. script.
  131.  
  132. All the keystrokes you type are remembered by DESQview, up to the
  133. limit of the Learn Scripts buffer. DESQview clicks after each
  134. keystroke to remind you that it's learning. (Clicks may be hard
  135. to hear on a noisy keyboard.)
  136.  
  137.  A script is saved in the Learn Scripts buffer while you're
  138. learning it. When you finish the Learn operation, it's
  139. transferred to the Program Scripts buffer.  There is a Program
  140. Scripts buffer for each program and one for scripts you create on
  141. DESQview menus. You can control the size of these buffers (larger
  142. buffers use more memory). See Appendix A for more information.
  143.  
  144. ~Subhead~ Nesting Scripts
  145.  
  146.  Scripts can be "nested" ~dash~ that is, while you're learning a
  147. script, you can enter the mapped key of another, previously
  148. defined, script. The only limit is the length of the Learn
  149. Scripts and Program Scripts buffers which must be large enough to
  150. contain both. 
  151.  
  152. ~Subhead~ Finishing the Script
  153.  
  154. When you've finished the last keystroke of the action you want to
  155. record, finish the Learn:
  156.  
  157. ~Step~ Press the Learn key (Shift-DESQ) to redisplay the Learn
  158. menu.
  159.  
  160. ~Step~ Select Finish Script.
  161.  
  162. The script is completed and assigned to the key you selected
  163. ~dash~ for example, the F1 key.
  164.  
  165.  Remember, you must always finish (or cancel) a script once you
  166. start it.  If you don't, when the Learn Scripts buffer is full, a
  167. loud beep will sound each time you press a key ~dash~ until you
  168. redisplay the Learn menu and either finish or cancel the script.
  169.  
  170.  To cancel the Learn:  Instead of selecting Finish Script, select
  171. Cancel Learn. If you've already finished the script, the only way
  172. to cancel it is to delete it ~dash~ see page 92.
  173.  
  174.  The Script is saved in the script buffer.
  175.  
  176. ~Heading~ Playing Back a Script
  177.  
  178.  Once you've learned a script, you can play it back at any time.
  179. If the script was learned for a particular program, you can play
  180. it back, whenever you're working in that program. If the script
  181. was learned on a DESQview menu, you can play it back when any
  182. DESQview menu is displayed.
  183.  
  184. ~Step~ For a program script, move the cursor to the point in the
  185. program where you want to play back the script. For a DESQview
  186. script, display the DESQview menu on which you want to start
  187. playing back the script.
  188.  
  189. ~Step~ Press the key you assigned to the script ~dash~ for
  190. example, the F1 key.
  191.  
  192.  DESQview types the keystrokes it previously remembered.
  193.  
  194.  When a script is played back, it's loaded into the Playback
  195. Scripts buffer for that program ~dash~ the entire script must
  196. fit. If the script plays back another script, that script is also
  197. loaded into the Playback Scripts buffer (in its entirety) at the
  198. time it's referenced. The initial length of this buffer is 1,024
  199. bytes. You can change its length using the Setup program (see
  200. Appendix A).
  201.  
  202.  You can stop the playback of a script by pressing the Ctrl-Break
  203. key. You can perform the mapped key's original function, rather
  204. than play back the script assigned to the key, by typing `
  205. immediately before the mapped key. You may reassign which key
  206. DESQview uses for the Quoting character from the Setup program,
  207. if you wish.
  208.  
  209. ~Heading~ Pausing During a Script
  210.  
  211.  Often you need to create a script that will temporarily stop
  212. during playback to allow you to enter variable information ~dash~
  213. for example, a file name ~dash~ or to wait for some action to
  214. complete, such as a spreadsheet recalculation.
  215.  
  216. DESQview allows you to stop playback by entering a pause in a
  217. script. A pause  tells DESQview that,while playing back the
  218. script, it should stop and either let you type in variable
  219. information or wait for a fixed length of time. There are four
  220. kinds of pauses:
  221.  
  222. ~Item~ A fixed-size pause allows you to type a fixed number of
  223. characters such as a phone number or other information of fixed
  224. length.
  225.  
  226. ~Item~ A variable pause allows you to type any number of
  227. characters. (You signal you're done by pressing <Enter>.)
  228.  
  229. ~Item~ An embedded learn works like a variable pause except that
  230. you may embed, or nest it within the script you are currently
  231. learning and it will be saved and mapped to another specified
  232. key. This enables your scripts to request variable information
  233. from the user, which can then be played back within the execution
  234. of the outer script. The embedded learn additionally becomes a
  235. new script which can also be played back independently. This is
  236. useful, for example, to capture keystrokes, such as a file name,
  237. which you need to reuse several times.
  238.  
  239. ~Item~ A time delay halts playback for a given number of seconds.
  240. This is useful for programs that ignore what you type while
  241. certain operations are in progress ~dash~ for example, saving a
  242. file to disk. The script resumes after the timed pause.
  243.  
  244. ~Subhead~ Defining a Fixed-Size Pause
  245.  
  246.  A fixed-size pause tells DESQview that when the script is played
  247. back, you want to pause playback, type a fixed number of
  248. characters, and have the script resume automatically. This would
  249. be useful, for instance, to ask the user for an eight character
  250. file name to which the script would add the extension. To define
  251. a fixed-size pause:
  252.  
  253. ~Step~ Start your script. Then enter keystrokes until you reach
  254. the point where you want to start the pause.
  255.  
  256. ~Step~ Press the Learn key (Shift-DESQ) to display the Learn
  257. menu.
  258.  
  259. ~Step~ Select Fixed-Size Pause.
  260.  
  261. The menu disappears and you're back where you were.
  262.  
  263. ~Step~ Type the text you want in the pause.
  264.  
  265. DESQview will count the number of characters you type. When
  266. you've entered all the pause text:
  267.  
  268. ~Step~ Display the Learn menu and select Fixed-Size Pause again.
  269.  
  270. DESQview finishes the pause and resumes learning the script.
  271.  
  272. ~Subhead~ Playing Back a Fixed-Size Pause
  273.  
  274.  When you play back a script with a fixed-size pause in it,
  275. DESQview stops at the point where you defined the pause:
  276.  
  277. ~Step~ Type the correct number of characters.
  278.  
  279. After you type the last character of the pause, the script
  280. resumes playing back.
  281.  
  282. ~Subhead~ Defining a Variable Pause
  283.  
  284.  A variable pause tells DESQview that, when the script is played
  285. back, you want to temporarily stop playback, type a variable
  286. number of characters, and then resume the script when you signal,
  287. by pressing the Enter key, that you've entered all the variable
  288. information. This would be useful, for instance, to ask the user
  289. to supply a file name of any length and then automatically add
  290. the extension. To define a variable pause:
  291.  
  292. ~Step~ Start your script. Then enter keystrokes until you reach
  293. the point where you want to start the pause.
  294.  
  295. ~Step~ Press the Learn key (Shift-DESQ) to display the Learn
  296. menu.
  297.  
  298. ~Step~ Select Variable Pause.
  299.  
  300. ~Step~ Type the text you want in the pause.
  301.  
  302. ~Step~ Display the Learn menu and select Variable Pause again.
  303.  
  304. This terminates the Variable Pause and DESQview  resumes learning
  305. the script.
  306.  
  307. To use the Enter key in a variable pause, you must precede it
  308. with the Quoting character (`). Otherwise, Enter will terminate
  309. the variable pause.
  310.  
  311. ~Subhead~ Playing Back a Variable Pause
  312.  
  313.  When you play back a variable pause, DESQview stops at the point
  314. where you defined the pause:
  315.  
  316. ~Step~ Type whatever variable information you want, of any
  317. length.
  318.  
  319. Since DESQview has no way of automatically determining when
  320. you're finished typing the variable information, you must
  321. indicate when you're done:
  322.  
  323. ~Step~ Press <Enter> when you've entered all the text you want.
  324.  
  325. The script resumes playing back.
  326.  
  327.  The <Enter> you press to complete a variable pause only tells
  328. Learn to resume playing back the rest of the script. It doesn't
  329. become part of the script and is never seen by the program in
  330. which the script is being played back.
  331.  
  332. ~Subhead~ Defining a Script with an Embedded Learn
  333.  
  334.  An embedded learn in a script tells DESQview that, when the
  335. script is played back, you want to temporarily stop playback,
  336. type a variable number of keystrokes, and then resume the script
  337. when you signal that you've entered all the variable information
  338. ~dash~ and, in addition, that you want the variable information
  339. you typed to be assigned to a key so that it can be used again.
  340. The mapped key for the embedded learn may be used again within
  341. the script being currently learned as well as independently.
  342.  
  343. The steps for creating an embedded learn within a script are
  344. basically the same as for learning a script:
  345.  
  346. ~Step~ Start your outer script. Then enter keystrokes until you
  347. reach the point where you want to start the embedded learn in the
  348. script.
  349.  
  350. ~Step~ Press the Learn key (Shift-DESQ) to display the Learn
  351. menu.
  352.  
  353. ~Step~ Select Start Script again.
  354.  
  355. ~Step~ Press the key you want to use ~dash~ for example, the F2
  356. key.
  357.  
  358. ~Step~ If you want your embedded script to have a name, supply a
  359. name.
  360.  
  361. This will be useful if you want to use the spawned script outside
  362. the script in which it was embedded.
  363.  
  364. ~Step~ Select LEARN Script.
  365.  
  366. ~Step~ Type whatever variable information you want, of any
  367. length.
  368.  
  369. ~Step~ Press the Learn key (Shift-DESQ) to display the Learn menu
  370. again.
  371.  
  372. ~Step~ Select Finish Script to complete the embedded learn.
  373.  
  374. DESQview completes learning the embedded script and assigns the
  375. keystrokes it remembered to the key you selected ~dash~ in this
  376. example, the F2 key. Then, DESQview resumes learning the original
  377. script. Type more keystrokes, as necessary to your operation.
  378.  
  379. ~Step~ Select Finish Script again to complete the outer script.
  380.  
  381. Now, whenever you press the F2 key, the information you just
  382. entered will be played back ~dash~ until you replay the original
  383. script again. When you do that, the script assigned to the F2 key
  384. is redefined to the new variable information you enter. For an
  385. example of  the implications of using the embedded script as part
  386. of the outer script, see the following page.
  387.  
  388.  See pages 108-109 of Chapter 6, Advanced Mark and Transfer, for
  389. an example of a script that uses embedded learn (to two levels)
  390. to mark a 200-line table and then transfer it into 1-2-3 in a
  391. single step.
  392.  
  393. ~Subhead~ Playing Back an Embedded Learn
  394.  
  395.  When you play back a script with an embedded learn in it,
  396. DESQview pauses at the point where you defined the embedded
  397. learn:
  398.  
  399. ~Step~ Type whatever variable information you want, of any
  400. length.
  401.  
  402. ~Step~ Press <Enter> when you've entered all the text you want.
  403.  
  404. If you need to use the Enter key within the pause, you may do so,
  405. but you must precede it with the quoting key (`).
  406.  
  407. The variable information you just typed replaces the information
  408. that was previously assigned to the key you selected ~dash~ for
  409. example, the F2 key ~dash~ and DESQview then resumes playing back
  410. the original script. Now, whenever you press the F2 key, the new
  411. information you just entered will be played back.  The script
  412. previously assigned to the F2 key is discarded.
  413.  
  414.  For example, to create a script on the F1 key that copies a
  415. group of document files (xxx*.DOC) to a floppy, deletes any
  416. related backup files (xxx.BAK), then lists the files on floppy as
  417. verification, you could use an embedded learn. Start the original
  418. learn, F1. At the point where you're ready to enter the file name
  419. for the first time, start an embedded learn , F2, then type the
  420. file name and end the embedded learn. You'll then continue with
  421. the original Learn, F1, and when you need the file name again,
  422. press the F2 key.  Don't forget to end the original learn.
  423. Symbolically, your script would be represented as:
  424.  
  425.       {F1}=COPY {F2}=<filename>.DOC  A:{Enter}                
  426.       DEL {F2}.BAK {Enter}
  427.       DIR  A:{F2}.DOC {Enter}
  428.  
  429.  If you want to be sure you don't accidentally press the F2 key
  430. later, you could assign the script created by the embedded learn
  431. to a more obscure key ~dash~ for example, Ctrl-^.
  432.  
  433.  Every time you ran the F1 script, it would pause, allow you to
  434. enter the filename, and remember (play back) the contents of F2
  435. within the execution of the outer script, F1.
  436.  
  437. ~Subhead~ Creating a Time Delay
  438.  
  439.  A time delay tells DESQview that, when the script is played
  440. back, you want to temporarily stop playback, wait a fixed number
  441. of seconds, and then have the script resume automatically. To
  442. define a timed delay:
  443.  
  444. ~Step~ Start your script. Then enter keystrokes until you reach
  445. the point where you want a time delay.
  446.  
  447. ~Step~ Press the Learn key (Shift-DESQ) to display the Learn
  448. menu.
  449.  
  450. ~Step~ Select the Time Delay to display the Time Delay menu.
  451.  
  452. ~Step~ Type the number of seconds you want the script to wait and
  453. then select LEARN Time Delay.
  454.  
  455. When you play back the script, it will halt at the point where
  456. you entered the time delay, for the number of seconds you
  457. indicated, and then automatically resume playing back.
  458.  
  459.  You can end the time delay early by pressing <Enter>.
  460.  
  461. ~Heading~ Loading and Saving Scripts
  462.  
  463.  When you create scripts, they're stored in your computer's
  464. memory. The areas set aside for scripts are called script
  465. buffers. There is a script buffer for each program running and
  466. one for the scripts you create on DESQview menus.
  467.  
  468. When you close a program the script buffer for that program is
  469. discarded and all scripts are lost ~dash~ unless you saved the
  470. scripts first. (You'll be reminded.) When you quit DESQview, all
  471. script buffers are discarded and all unsaved scripts are lost.
  472.  
  473. You save the scripts you've created with the Save Scripts command
  474. on the Learn menu. You must save the scripts for each program and
  475. for DESQview menus separately.
  476.  
  477.  While a script is being learned, it's stored in the Learn
  478. Scripts buffer. When the script is complete, it's transferred to
  479. the Program Scripts buffer or to the DESQview Scripts buffer.
  480. Initially, the Learn Scripts buffer and each Program Scripts
  481. buffers is 1,024 bytes long. The script buffer size is cumulative
  482. ~dash~  it's the maximum limit for all scripts you create for a
  483. program or for all scripts you create on all DESQview menus.
  484.  
  485.  You can change the Program Scripts buffer size using the Change
  486. a Program command (see Chapter 7). You can change the Learn
  487. Scripts buffer size and the DESQview Scripts buffer size by
  488. running the Setup program (see Appendix A).
  489.  
  490. ~Subhead~ Loading Scripts
  491.  
  492.  When you start up DESQview, the scripts you created on DESQview
  493. menus are automatically loaded (if any). Then, each time you
  494. start up a program, the scripts for that program are
  495. automatically loaded (if any).
  496.  
  497. ~Begin footnote~
  498.  
  499. Only the scripts in a script file conforming to the naming
  500. convention described here are loaded automatically.
  501.  
  502. ~End footnote~
  503.  
  504. You can also tell DESQview to explicitly load the DESQview
  505. scripts or the scripts for a program. This is useful, for
  506. example, after you've modified a script with the Convert a Script
  507. program (see Appendix I) or if you have several different sets of
  508. scripts for the same program. To explicitly load scripts:
  509.  
  510. ~Step~ For application-specific scripts, make the program you
  511. want to load the scripts for the current window, if you aren't
  512. already working in it. To load the DESQview scripts, display the
  513. DESQview menu.
  514.  
  515. ~Step~ Display the Learn menu and select Load Scripts.
  516.  
  517. The Load Scripts menu appears with the standard script file name
  518. filled into the File field. For DESQview scripts, the standard
  519. file name is DESQVIEW.DVS. For a program, the standard file name
  520. is xx-SCRIP.DVS, where xx are the keys used to select the program
  521. from the Open Window menu. (This guarantees that the file name is
  522. unique.) Script files are assumed to be stored on the drive and
  523. directory from which you started up DESQview (most commonly,
  524. C:\DV) unless you explicitly specify a drive and directory.
  525.  
  526.  For information on managing scripts on a floppy-based system,
  527. see Appendix D.
  528.  
  529. ~Step~ Change the file name, as may be required.
  530.  
  531. ~Step~ Select LOAD Scripts.
  532.  
  533. The script file you specified is loaded, replacing the DESQview
  534. or programs scripts that are currently loaded (if any). Any
  535. changes you made to these scripts are lost unless you previously
  536. saved them using the Save Scripts command.
  537.  
  538. ~Subhead~ Saving Scripts
  539.  
  540.  The scripts you create are stored in your computer's memory.
  541. They're not saved to disk automatically until you explicitly tell
  542. DESQview to do so.  (However, you are reminded to do so when you
  543. close down a program or quit DESQview.) To save scripts:
  544.  
  545. ~Step~ Resume working in the program you want to save scripts
  546. for, if you aren't already working in it. Or, to save the
  547. DESQview scripts, display any DESQview menu.
  548.  
  549. ~Step~ Display the Learn menu and select Save Scripts.
  550.  
  551. The Save Scripts menu appears with the standard script file name
  552. filled into the File field ~dash~ or, if you loaded these scripts
  553. with the Load Scripts command, the File field contains the file
  554. name you used. For DESQview scripts, the standard file name is
  555. DESQVIEW.DVS. For a program, the standard file name is xx-
  556. SCRIP.DVS, where xx are the keys used to select the program from
  557. the Open Window menu.
  558.  
  559. ~Step~ Change the file name, as you require.
  560.  
  561. However, we recommend that you do not change the file name unless
  562. you're creating multiple sets of scripts for a program or for
  563. DESQview ~dash~ because only the script files named DESQVIEW.DVS
  564. and xx- SCRIP.DVS will be automatically loaded when DESQview or
  565. the program is started up. If you give the script file any other
  566. name, it can only be loaded manually, with the Load Scripts
  567. command.
  568.  
  569. ~Step~ Select SAVE Scripts.
  570.  
  571. The scripts you specified are saved to disk under the name you
  572. specified ~dash~ on the drive and directory from which you
  573. started up DESQview (most commonly, C:\DV) unless you explicitly
  574. specify a drive and directory to use.
  575.  
  576. ~Subhead~ Saving Scripts Containing an Embedded Learn
  577.  
  578.  When a script containing an embedded learn is saved for the
  579. first time, the contents and key assignment of the embedded learn
  580. is saved with it. If you always wish to save the contents of the
  581. embedded learn, you must thereafter explicitly save the scripts
  582. for that program. DESQview will not interpret a change in the
  583. embedded variable keystrokes as a "new" script. This is only
  584. noteworthy if you intend to retain the contents of the embedded
  585. script  and you wish to use it for the next session.
  586.  
  587. ~Heading~ Other Learn Features
  588.  
  589.  Learn has several additional features:
  590.  
  591. ~Item~ You can delete a script you no longer want.
  592.  
  593. ~Item~ You can display a menu listing of all the scripts you've
  594. created for DESQview and for each program and optionally choose
  595. and execute a script from this menu.
  596.  
  597. ~Item~ You can define a startup script for DESQview and for each
  598. program.
  599.  
  600. ~Item~ You can use the ` (Quoting) key to override a key
  601. redefinition and the Ctrl- Break key to abort the playback of a
  602. script.
  603.  
  604. ~Item~ You can edit or debug a script using the Convert a Script
  605. program to convert a script file into a text (ASCII) file.  You
  606. can then edit the script in any text editor or word processor
  607. that reads and writes a plain ASCII file. Convert a Script also
  608. reads a text file and converts it into a script file when you are
  609. done editing.
  610.  
  611. ~Item~ You can use DESQview Notepad Companion,
  612.  
  613. ~Begin footnote~
  614.  
  615. Available separately from Quarterdeck Office Systems
  616.  
  617. ~End footnote~
  618.  
  619. if you have it, to edit script files. Conversion of script
  620. files is automatic when using Notepad.
  621.  
  622. ~Subhead~ Deleting a Script
  623.  
  624.  You delete a script by re-learning an empty script for the key
  625. you mapped. 
  626.  
  627. ~Step~ Display the Learn menu and select Start Script.
  628.  
  629. ~Step~ Press the key for the script you want to delete
  630.  
  631. ~Step~ Select LEARN Script.
  632.  
  633. Now, immediately end the Learn:
  634.  
  635. ~Step~ Display the Learn menu again and select Finish Script.
  636.  
  637. The key you used for the script is now restored to its normal
  638. usage.
  639.  
  640. ~Subhead~ Getting a List of Scripts
  641.  
  642.  To see a list of all scripts you've created:
  643.  
  644. ~Step~ Display the Learn menu and select Display Scripts.
  645.  
  646. A menu listing the scripts you've created appears. Both the key
  647. and the name you gave to the script in the Script Name field (if
  648. any) are shown.
  649.  
  650. ~Step~ Select the script you want to delete ~dash~ or press Esc
  651. to remove the menu.
  652.  
  653. ~Subhead~ Defining a Startup Script
  654.  
  655.  You can specify a script to be a startup script. A startup
  656. script is executed when you start up a program or start up
  657. DESQview, as well as when you press the key you assigned to the
  658. script.
  659.  
  660. To create a startup script, learn a script in the normal manner.
  661. But, when the Start a Script menu appears, enter a name that
  662. begins with an exclamation point (!) in the Script Name field
  663. ~dash~  for example, !Startup DESQview. Now, this script will
  664. automatically be performed when the program or DESQview is
  665. started up.
  666.  
  667. To be sure you startup script plays back properly:
  668.  
  669. ~Item~ When you learn a program startup script, be sure to learn
  670. it immediately after starting up the program.
  671.  
  672. ~Item~ When you learn a DESQview startup script, be sure to learn
  673. it with no windows open and with the DESQview menu displayed.
  674.  
  675. DESQview also recognizes an alternate method of defining the
  676. DESQview startup script ~dash~ assigning a DESQview script to the
  677. exclamation point (!) key. Only DESQview scripts function as
  678. startup scripts when assigned to the ! key. This doesn't apply to
  679. program scripts.
  680.  
  681. ~Subhead~ Special Learn Keys
  682.  
  683.  DESQview recognizes three special keys for learn:
  684.  
  685. ~Item~ The Learn key (Shift-DESQ) displays the Learn menu ~dash~
  686. which is your starting point for all Learn operations, except
  687. playback. See page 36 for more information.
  688.  
  689. ~Item~ The  ` (Quoting key) overrides a key redefinition.
  690. Normally, when you press a key you've redefined ~dash~ for
  691. example, the F1 key ~dash~ the key performs the script you
  692. learned for that key. However, if you press the ` key immediately
  693. before the F1 key, the original action of the F1 key, is
  694. performed instead. See page 40 for more information. You may
  695. redefine the Learn key, Quoting key, and other DESQview system
  696. keys as well, in the DESQview Setup program (see appendix A).
  697.  
  698.  The Ctrl-Break key stops (aborts) the playback of a script. When
  699. you press Ctrl-Break while a script is being played back, the
  700. script is aborted. (If you press Ctrl-Break at any other time,
  701. it's acted upon by the program.)  See page 41 for more
  702. information.
  703.  
  704. ~Heading~ The Convert a Script Program
  705.  
  706.  The scripts you create are written to disk in a special, encoded
  707. format. Sometimes it's useful to be able to edit them, or to
  708. create your own scripts directly with a word processor. The
  709. Convert a Script program lets you do this.
  710.  
  711. When you run the Convert a Script program, you can read a script
  712. file written by the Save Scripts command, or convert a script you
  713. prepared with your word processor (as an ASCII text file) into
  714. the format of a script file.
  715.  
  716. To run Convert a Script, first use Add a Program to install it on
  717. the Open Window Menu. Convert a Script is in your DESQview
  718. directory (CONVSCR.COM).
  719.  
  720. ~Subhead~ Getting Started
  721.  
  722.  Appendix I, Editing DESQview Scripts, discusses the Convert a
  723. Script program in detail and lists all the keys you can use (or
  724. can't use) in creating scripts. Basically, the easiest way to
  725. learn how to use Convert a Script is:
  726.  
  727. ~Item~ Create a few scripts for a program you're familiar with
  728. ~dash~ such as Lotus 1-2-3.
  729.  
  730. ~Item~ Save these scripts to a file using the Save Scripts
  731. command. Note the name of the file that appears when you display
  732. the Save Scripts menu ~dash~ for example, L2-SCRIPT.DVS. A
  733. DESQview startup script is named DESQVIEW.DVS.
  734.  
  735. ~Item~ Edit the scripts:
  736.  
  737.  ~dash~  If you have the DESQview Notepad Companion,
  738.  
  739. ~Begin footnote~
  740.  
  741. Available separately from Quarterdeck Office Systems
  742.  
  743. ~End footnote~
  744.  
  745. you can edit script files directly. Just edit the file \DV\L2-
  746. SCRIP.DVS in non-document mode (see Appendix I for more
  747. information).
  748.  
  749.  ~dash~  If you don't have the DESQview Notepad Companion, run
  750. Convert a Script to convert the scripts you saved to a text
  751. (ASCII) file, edit them with your word processor,
  752.  
  753. ~Begin footnote~
  754.  
  755. When you save the file be sure to save it as raw ASCII text,
  756. without any formatting  or embedded control characters.
  757.  
  758. ~End footnote~
  759.  
  760. then run Convert a Script again to convert them back to script
  761. file format.
  762.  
  763. ~Item~ Load the edited scripts back into DESQview using the Load
  764. Scripts command.
  765.  
  766. Repeat this process until the scripts work the way you want.
  767.  
  768. ~Subhead~ Directly Creating a Script
  769.  
  770.  You can also create a script directly with the DESQview Notepad
  771. Companion or with your favorite word processor. Enter a list of
  772. key definitions (see Appendix I). If you're not using Notepad,
  773. save these definitions to a file~dagger~~dagger~ and run Convert
  774. a Script to convert this file to script file format.
  775.